package cn.fl.ref.scmbaseinfo.service;

import java.util.List;
import java.util.Map;

import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.page.KeyValueVO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.ref.crbaseinfo.vo.CrBaseInfoVO;
import cn.fl.ref.scmbaseinfo.vo.ScmBaseInfoVO;
import cn.fl.ref.scmbaseinfo.vo.ScmChrgParaVO;
import fl.flow.facade.flow.dto.FlowStartParamsDTO;
import fl.ref.scmbaseinfo.condition.ScmBaseInfoQueryCondition;

public interface IScmBaseInfoService {
	
	/**
	 * 获取唯一对象
	 * @param id 主键
	 * @param buOrgCd 业务部
	 * @return 对象DTO
	 */
	public ScmBaseInfoVO selectById(Long id) throws BaseException;
	
	/**
	 * 查询方案信息集合
	 * @param condition
	 * @return
	 * @throws BaseException
	 */
	public List<ScmBaseInfoVO> selectBscLstByCondition(ScmBaseInfoQueryCondition condition) throws BaseException;
	
	public List<Map<String, Object>> selectBscLstMapByCondition(ScmBaseInfoQueryCondition condition) throws BaseException;
	
	/**
	 * 详细信息获取唯一对象
	 * @param id 主键
	 * @return 对象DTO
	 */
	public ScmBaseInfoVO selectDetailById(Long id) throws BaseException;
	
	/**
	 * 新增
	 * @param entity
	 * @return
	 */
    public Long add(ScmBaseInfoVO entity) throws BaseException;
    
    public Long insertByBatch(List<ScmChrgParaVO> chrgLst) throws BaseException;
    
    public List<ScmChrgParaVO> selectChrgDataByScmId(Long fncScmId) throws BaseException;
    
    public CrBaseInfoVO selectByCrId(String crId) throws BaseException;
    
    public Long deleteChrgDataByScmId(Long fncScmId) throws BaseException;
    
    public Integer selectExistScmCntByCondition(ScmBaseInfoQueryCondition condition);
    
    /**
     * 删除
     * @param id
     * @return
     */
    public boolean removeById(Long id)throws BaseException;
    
    /**
     * 删除
     * @param ids
     * @return
     */
    public boolean removeByIds(List<Long> ids)throws BaseException;
    
    /**
     * 修改
     * @param entity
     * @return
     */
    public int modify(ScmBaseInfoVO entity)throws BaseException;

    /**
     * 分页查询所有
     * @param page
     * @return
     */
    public Pager searchListPage(Pager page)throws BaseException;
    
    /**
     * 提取是否状态字典项
     */
    public List<KeyValueVO> searchWthrKVList()throws BaseException;

	public DataResultDTO addFlowStart(FlowStartParamsDTO flowStartParamsDTO);

	/**
     * 保证金是否坐扣增加‘默认已付’选项
     */
	public List<KeyValueVO> searchWthrKVListBZJ();

}
